package com.bruce.practice.if_enum;

/**
 * @author luotuan
 * @create 2019-01-09 14:24
 **/
public enum Operator {
    //ADD, MULTIPLY, SUBTRACT, DIVIDE
    ADD {
        @Override
        public int apply(int a, int b) {
            return a + b;
        }
    },
    DIVIDE{
        @Override
        public int apply(int a, int b) {
            return a/b;
        }
    };
    public abstract int apply(int a, int b);
}
